<template>
	<view class="padding-top">
		<form class="" @submit="formSubmit">
			<view class="card-menu cu-list menu">
				<view class="cu-item ">
					<view class="content">
						<text class="text-orange cuIcon-roundrightfill"></text>您管理的社区
					</view>
				</view>
			</view>
			<view class="card-menu cu-list menu" >
				<view class="cu-item arrow" v-for="(item,key) in list" :key="key">
					<view class="content padding-tb-sm" @click="bindClick(item.shequName,item.shequid)">
						{{item.shequName}}
						<view class="text-gray ">
							 编号: {{item.shequid}}
						</view>
					</view>
				</view>
			</view>
			
		</form>
	</view>
</template>

<script>
	
	import {post,get} from '../../../utils/index.js';
	export default {
		data() {
			return {
				list:[],
			}
		},
		onLoad() {
			post(this.weixin_app + '/wxapp/check_shequ_list').then(res=>{
				this.list = res.data;
			});
		},
		onUnload() {
			uni.$emit('shequ_select',{type:-1})
		},
		methods: {
			bindClick(n,i){
				uni.setStorageSync('shequ_id', i);
				uni.setStorageSync('shequ_name', n);
				uni.$emit('shequ_select',{shequ_name:n,shequ_id:i,type:1})
				uni.navigateBack({
					delta:1
				})
			}
		}
	}
</script>

<style>

</style>
